<?php

class indexController extends baseController {
	
	public function index() {
		
		//check if form was submitted
		if ($this->registry->router->getPostValue ( 'submit' )) {
			$user_login = $this->registry->router->getPostValue ( 'login' );
			$user_password = $this->registry->router->getPostValue ( 'password' );
			
			Auth::authorize ( $user_login, $user_password );
			
			$user = Auth::getInstanse ();
			
			$this->registry->template->user = $user;
		}
	}

}

?>

